<template>
  <div>
    <Row :gutter="10">
      <Col span="12">
        <Card>
          <p slot="title">
            <Icon type="ios-browsers-outline"></Icon>
            折扣大类
          </p>
          <big-class-list ref="bigClassList" :homeId="homeId" v-on="{refreshSmallClassList:refreshSmallClassList}"></big-class-list>
        </Card>
      </Col>
      <Col span="12">
        <Card>
          <p slot="title">
            <Icon type="ios-browsers-outline"></Icon>
            折扣项目
          </p>
          <project-list ref="projectList" :homeId="homeId"></project-list>
        </Card>
      </Col>
    </Row>
    <br>
    <Row :gutter="10">
      <Col span="12">
        <Card>
          <p slot="title">
            <Icon type="ios-browsers-outline"></Icon>
            折扣小类
          </p>
          <small-class-list ref="smallClassList" :homeId="homeId" v-on="{refreshProjectList:refreshProjectList}"></small-class-list>
        </Card>
      </Col>
    </Row>
  </div>
</template>

<script>
    import bigClassList from '@/view/basic/info/list/DiscountProjectBigClassList.vue';
    import smallClassList from '@/view/basic/info/list/DiscountProjectSmallClassList.vue';
    import projectList from '@/view/basic/info/list/DiscountProjectList.vue';
    export default {
        components: {
            bigClassList,
            smallClassList,
            projectList
        },
        props: {
            homeId: {
                type: Number,
                default: -1
            }
        },
        data () {
            return {
            };
        },
        methods: {
            init () {

            },
            refresh () {
                this.refreshBigClassList()
                this.refreshSmallClassList()
                this.refreshProjectList()
            },
            refreshBigClassList () {
                this.$refs.bigClassList.refresh()
            },
            refreshSmallClassList () {
                this.$refs.smallClassList.refresh()
            },
            refreshProjectList () {
                this.$refs.projectList.refresh()
            }
        },
        mounted () {
        }
    }
</script>

<style>

</style>
